package hadix.parse

import hadix.Info

import static hadix.Resource.load

/**
 * User: hadix
 * Date: 13-7-9
 * Time: PM9:04
 */
class ParserShoeshrTest extends GroovyTestCase {
    def parser = new ParserShoeshr(searchPageLink: 'main_link')

    void testDoParse() {
        def info = new Info()
        info = parser.doParse(info, load('/info_shoeshr.html'))
        println info
        assertNotNull info.con_name
    }

    void testParseTypeLinks() {

    }

    void testDoParseInfos() {
        def infos = parser.parseInfos(load('/info_list_shoeshr.html'))
        assertTrue(infos.size() > 0)
        assertNotNull(infos[0].title)
        assertNotNull(infos[0].link)
        assertNotNull(infos[0].time)
    }

    void testPageLink() {

    }
}
